package base.多线程;

import java.util.concurrent.FutureTask;

public class T {
    public static void main(String[] args) {
        MyThread mt = new MyThread();
        Thread t1 = new Thread(mt);
        t1.setName("线程1");
//        t1.start();

        MyCallable mc = new MyCallable();
        FutureTask<Integer> ft = new FutureTask<>(mc);
        Thread t2 = new Thread(ft);
        t2.setName("线程2");
        t2.start();
        t1.start();

    }
}
